import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import {SettingPage} from "../pages/setting/setting";
import {ScenePage} from "../pages/scene/scene";
import {DevicePage} from "../pages/device/device";
import {EditScenePage} from "../pages/edit-scene/edit-scene";
import {ChooseUsedScenePage} from "../pages/choose-used-scene/choose-used-scene";
import {ChooseUsedDevicePage} from "../pages/choose-used-device/choose-used-device";
import {SetNewAccountPage} from "../pages/set-new-account/set-new-account";
import {SetAccountPermissionPage} from "../pages/set-account-permission/set-account-permission";
import {SetAboutPage} from "../pages/set-about/set-about";
import {LoginPage} from "../pages/login/login";
import {StartPage} from "../pages/start/start";
import {DeviceListPage} from "../pages/device-list/device-list";
import {MessagePage} from "../pages/message/message";
import {DeviceSetPage} from "../pages/device-set/device-set";
import {ChangePasswordPage} from "../pages/change-password/change-password";
import {ChangePhonePage} from "../pages/change-phone/change-phone";
import {ChangePhoneConfirmPage} from "../pages/change-phone-confirm/change-phone-confirm";
import {CreateScenePage} from "../pages/create-scene/create-scene";
import {ForgetPasswordPage} from "../pages/forget-password/forget-password";
import {ForgetPasswordNewPage} from "../pages/forget-password-new/forget-password-new";
import { PublicProvider } from '../providers/public/public';

import {HttpClient, HttpClientModule} from "@angular/common/http";
import {DeviceRoomChoosePage} from "../pages/device-room-choose/device-room-choose";
import {TimingPage} from "../pages/timing/timing";
import {SceneRoomChoosePage} from "../pages/scene-room-choose/scene-room-choose";



@NgModule({
  declarations: [
    MyApp,

    StartPage,
    LoginPage,
    ForgetPasswordPage,
    ForgetPasswordNewPage,

    TabsPage,
    HomePage,
    DevicePage,
    ScenePage,
    SettingPage,
    MessagePage,
    TimingPage,

    ChooseUsedScenePage,
    ChooseUsedDevicePage,

    DeviceListPage,
    DeviceSetPage,
    DeviceRoomChoosePage,
    SceneRoomChoosePage,

    EditScenePage,
    CreateScenePage,

    ChangePhonePage,
    ChangePasswordPage,
    ChangePhoneConfirmPage,
    SetNewAccountPage,
    SetAccountPermissionPage,
    SetAboutPage,
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    // IonicModule.forRoot(MyApp)
    IonicModule.forRoot(MyApp, {
     tabsHideOnSubPages: 'true',
    })

  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,

    StartPage,
    LoginPage,
    ForgetPasswordPage,
    ForgetPasswordNewPage,

    TabsPage,
    HomePage,
    DevicePage,
    ScenePage,
    SettingPage,
    MessagePage,
    TimingPage,

    ChooseUsedScenePage,
    ChooseUsedDevicePage,

    DeviceListPage,
    DeviceSetPage,
    DeviceRoomChoosePage,
    SceneRoomChoosePage,

    EditScenePage,
    CreateScenePage,

    ChangePhonePage,
    ChangePasswordPage,
    ChangePhoneConfirmPage,
    SetNewAccountPage,
    SetAccountPermissionPage,
    SetAboutPage,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    PublicProvider,
    HttpClient
  ]
})
export class AppModule {}
